package org.alma.opengl

import java.io.File
import java.awt.event.{KeyEvent, KeyAdapter}

object Program
{
  val renderer = new Renderer
  
  def main(args: Array[String]) : Unit =
  { 
    
    GLDisplay("Billedfremviser", new java.awt.Dimension(800, 600), renderer)
    GLDisplay.KeyboardListeners += KeyListener
    
    GLDisplay.start
  }
  
  object KeyListener extends KeyAdapter
  {
    override def keyTyped(e: KeyEvent) =
    {
      if (e.getKeyChar == KeyEvent.VK_ESCAPE)
        GLDisplay.stop
    }
  }
}
